package com.yu1996.gulimall.member.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yu1996.common.utils.PageUtils;
import com.yu1996.gulimall.member.entity.MemberEntity;

import com.yu1996.gulimall.member.exception.PhoneExistException;
import com.yu1996.gulimall.member.exception.UsernameExistException;
import com.yu1996.gulimall.member.vo.UserLoginVo;
import com.yu1996.gulimall.member.vo.UserRegisterVo;
import java.util.Map;

/**
 * 会员
 *
 * @author yu
 * @email 1798121567@qq.com
 * @date 2021-08-06 12:06:51
 */
public interface MemberService extends IService<MemberEntity> {

  PageUtils queryPage(Map<String, Object> params);

  /**
   * 会员注册
   *
   * @param userRegisterVo
   */
  void regist(UserRegisterVo userRegisterVo) throws PhoneExistException,UsernameExistException;

  /**
   * 检查手机号是否存在
   *
   * @param phone
   */
  void checkPhoneUnique(String phone) throws PhoneExistException;

  /**
   * 检查用户名是否存在
   *
   * @param username
   */
  void checkUsernameUnique(String username) throws UsernameExistException;

  /**
   * 用户登录   ---member
   * @param userLoginVo
   * @return
   */
  MemberEntity login(UserLoginVo userLoginVo);
}
